package ro.k.servlets.newOrder;

import java.io.IOException;
import java.util.Enumeration;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import ro.k.servlets.KConstants;
import ro.k.tags.ComandaManopera;
import ro.k.tags.DBManopera;
import ro.k.tags.ReqManopera;
import ro.k.tags.ReqPiese;
import ro.k.web.beans.ClientMasinaBean;

/**
 * Servlet implementation class FinishNew
 */
@WebServlet("/finishNew")
public class FinishNew extends HttpServlet {
	private static final long serialVersionUID = 1L;

	/**
	 * @see HttpServlet#HttpServlet()
	 */
	public FinishNew() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse
	 *      response)
	 */
	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {

		HttpSession sess = request.getSession();
		Enumeration<String> attr = sess.getAttributeNames();

		// [tagReqMan, tagDBMan, tagCmdMan, tagReqPiese, kSessionUser]
		ClientMasinaBean cmb = (ClientMasinaBean) sess.getAttribute(KConstants.ClientCar);
		ReqManopera reqMan = (ReqManopera) sess.getAttribute("tagReqMan");
		DBManopera dbMan = (DBManopera) sess.getAttribute("tagDBMan");
		ComandaManopera manopera = (ComandaManopera) sess.getAttribute("tagCmdMan");
		ReqPiese reqPiese = (ReqPiese)sess.getAttribute("tagReqPiese");
		
		
		

		response.sendRedirect(request.getContextPath() + "/jsp/main.jsp");
	}

}
